
var MainLayer = cc.Layer.extend({
    sprite:null,
    ctor:function () {
        //////////////////////////////
        // 1. super init first
        this._super();

        /////////////////////////////
        // 2. add a menu item with "X" image, which is clicked to quit the program
        //    you may modify it.
        // ask the window size
        var size = cc.winSize;

        var mainscene1 = ccs.load(res.Main_json);
        this.addChild(mainscene1.node);
        
        var TopBar = mainscene1.node.getChildByName('TopBar');
        var Panel_24 = TopBar.getChildByName('Panel_24');
        var username = Panel_24.getChildByName('Text_17'); 
        username.setString('崔大头');

        return true;
    }
});

var MainScene = cc.Scene.extend({
    onEnter:function () {
        this._super();
        var layer = new MainLayer();
        this.addChild(layer);
    }
});

